{% extends "base.html" %}

{%block title%}Wizyty{%endblock%}

{% block content %}
	<div id="content">
		<h2>Wizyty</h2>
		<table class="results">
			<tr>
				<th colspan="3">Wizyty pacjenta <i>{{profile}}</i></th>
			</tr>
			<tr style="color:black; font-weight:bold; text-align:center;">
				<td>ID</td>
				<td>Data wizyty</td>
				<td>Pokaż</td>
			</tr>
			{%for v in visit%}
			<tr>
				<td>{{v.id}}</td>
				<td>{{v.date}}</td>
				<td><a href="{%url visit-show v.id%}"><img src="{{MEDIA_URL}}/images/info.png" alt="Pokaż" title="Pokaż wizytę: {{v.date}}"/></a></td>
			</tr>
			{%empty%}
			<tr>
				<td colspan="3">Brak wizyt</td>
			</tr>
			{%endfor%}
			<tr>
				<td class="ta-c" colspan="3">
					<form>
						<button type="submit" formaction="javascript:history.back()" class="m-t m-b">Wstecz</button>
						<button type="submit" formaction="{%url visit-add profile.id%}" class="m-t m-b">Nowa wizyta</button>
					</form>
				</td>
			</tr>
		</table>
	</div>
{% endblock %}
